package com.shycloud.mido.music.dto;

import cn.hutool.core.util.StrUtil;

import java.math.BigDecimal;
import java.net.Inet4Address;
import java.util.List;

import com.shycloud.mido.music.domain.MisMusicCollection;
import com.shycloud.mido.music.vo.MisMusicVO;
import lombok.Getter;
import lombok.Setter;

/**
 * @author nianhua.jiang
 * @description
 * @date 2020/6/17
 */
public class MisMusicCollectionDTO extends MisMusicCollection implements Comparable<MisMusicCollectionDTO> {

	/** 是否收藏 */
	private Boolean isSave = false;

	public Boolean getIsSave() {
		return isSave;
	}

	public void setIsSave(String isSave) {

		if (StrUtil.isNotBlank(isSave)) {
			this.isSave = true;
		} else {
			this.isSave = false;
		}
	}

	@Getter
	@Setter
	private Integer musicCount = 0;

	@Getter
	@Setter
	private String library;

	@Getter
	@Setter
	private List<Integer> libraryIds;

	/** 词频 */
	@Getter
	@Setter
	private BigDecimal frequency = BigDecimal.ZERO;

	//购物车状态
	@Getter
	@Setter
	private Integer cartStatus;

	//是否为推荐(热门)物品
	@Getter
	@Setter
	private Integer recommendStatus;

	//是否已经购买
	@Getter
	@Setter
	private Integer buyStatus;

	@Getter
	@Setter
	private Integer musicFailCount;

	@Override
	public int compareTo(MisMusicCollectionDTO misMusicCollectionDTO) {
		return misMusicCollectionDTO.getFrequency().compareTo(this.getFrequency());
	}
}
